package cn.enjoy.design.structure.zuhe.engine;

import cn.enjoy.design.structure.zuhe.logic.LogicFilter;
import cn.enjoy.design.structure.zuhe.logic.impl.UserAgeFilter;
import cn.enjoy.design.structure.zuhe.logic.impl.UserGenderFilter;
import lombok.Data;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author K
 * @date 2021/5/24 下午3:03
 */
@Data
public class EngineConfig {

    /**
     * key：ruleKey  value：具体过滤器
     */
    static Map<String, LogicFilter> logicFilterMap;

    static {
        logicFilterMap = new ConcurrentHashMap<>();
        logicFilterMap.put("userAge", new UserAgeFilter());
        logicFilterMap.put("userGender", new UserGenderFilter());
    }

}